﻿using System;
using System.ComponentModel;
using System.Configuration;
using System.Drawing.Design;
using mki.Backup.Objects.Converters;

namespace mki.Backup.Objects
{
	public class ZipAddFolderElement : CustomConfigurationElement
	{
		#region Properties (3)

		// Public Properties (3) 

		/// <summary>
		/// Gets or sets the delete after processing.
		/// </summary>
		/// <value>
		/// The delete after processing.
		/// </value>
		[ConfigurationProperty("delete", IsRequired = true)]
		public Boolean Delete
		{
			get { return Boolean.Parse(this["delete"].ToString()); }
			set { this["delete"] = value; }
		}

		/// <summary>
		/// Gets or sets the name.
		/// </summary>
		/// <value>The name.</value>
		[ConfigurationProperty("name", IsRequired = true, IsKey = true)]
		public new String Name
		{
			get { return base["name"].ToString(); }
			set
			{
				base["name"] = value;
				base.OnPropertyChanged("Name");
			}
		}

		/// <summary>
		/// Gets or sets the source folder.
		/// </summary>
		/// <value>
		/// The source folder.
		/// </value>
		[ConfigurationProperty("source", IsRequired = true)]
		[Editor(typeof(System.Windows.Forms.Design.FolderNameEditor), typeof(UITypeEditor)), TypeConverter(typeof(ReadOnlyStringConverter))]
		public String Source
		{
			get { return this["source"].ToString(); }
			set { this["source"] = value; }
		}

		#endregion Properties
	}
}